﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Default.aspx.cs" Inherits="WhereIsMyCash.Web._Default" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
    <link rel="Stylesheet" href="css/jqui/jquery-ui.css" />
    <link rel="Stylesheet" href="css/flexigrid/flexigrid.css" />

    <script type="text/javascript" src="js/jquery-vsdoc.js"></script>

    <script type="text/javascript" src="js/jquery.js"></script>

    <script type="text/javascript" src="js/jquery-ui.js"></script>

    <script type="text/javascript" src="js/ui.datepicker-zh-CN.js"></script>

    <script type="text/javascript" src="js/flexigrid.js"></script>

    <script type="text/javascript">
        $(document).ready
        (
            function() {
                $("#txtDatepicker").datepicker();
                $("#flexAccount").flexigrid
                (
                    {
                        url : 'Default.aspx?action=loadgrid',
                        dataType : 'json',
                        colModel : [
                                { display : 'ID', name : 'id', width : 40, sortable : true, align : "center" },
                                { display : '账户名', name : 'name', width : 80, sortable : true, align : "center" },
                                { display : '开户行', name : 'bank', width : 80, sortable : true, align : "center" },
                                { display: '余额', name: 'leftcash', width: 80, sortable: true, align: "center" },
                                { display: '余额1', name: 'leftcash1', width: 80, sortable: true, align: "center" }
                                ],
                        buttons : [
                                { name : 'Add', bclass : 'add', onpress : test },
                                { name : 'Delete', bclass : 'delete', onpress : test },
                                { separator : true }
                                ],
                        searchitems : [
				                { display: 'ID', name : 'id' },
				                { display: '账户名', name : 'accountName', isdefault: true }
				                ],
				        sortname: "id",
				        sortorder: "asc",
				        usepager: true,
				        title: '账户',
				        useRp: true,
				        rp: 15,
				        showTableToggleBtn: true,
				        width: 700,
				        height: 200
                    }
                );
            }
        );
        
        function test(com,grid)
        {
            if (com=='Delete')
            {
                confirm('Delete ' + $('.trSelected',grid).length + ' items?')
            }
            else if (com=='Add')
            {
                alert('Add New Item');
            }
        }
    </script>

</head>
<body>
    <form id="form1" runat="server">
    <div>
        <input type="text" id="txtDatepicker" />
        <table id="flexAccount">
        </table>
    </div>
    </form>
</body>
</html>
